﻿/*
 *Author: Jeff Liu 
 *
 *Under MIT License
 *jebberwocky@gmail.com
 */
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Text;
using System.Collections;

/// <summary>
/// Summary description for HtmlUtil
/// </summary>
/// TODO: NOUSER NOW
public class HtmlUtil
{
    public HtmlUtil() { }

    public static Hashtable texToFix = new Hashtable();

    static HtmlUtil()
    {
        texToFix["0026#39;"] = "'";
        texToFix["0026quot;"] = @"""";
        texToFix["003d"] = "=";
    }

    public static String FixGoogleUrlEncode(String text)
    {
        if (text == null)
            return null;
        foreach (Object k in texToFix.Keys)
        {
            String key = DataUtil.ObjetToString(k);
            text = text.Replace(key, DataUtil.ObjetToString(texToFix[key]));
        }
        return text;
    }

}
